Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support jakarta jsp #75

Merged
merged 22 commits into from
Aug 2, 2024
Merged

feat: support jakarta jsp #75

merged 22 commits into from
Aug 2, 2024

Conversation

jeremylong
Copy link
Member

Pretty sure a few other things need to be updated - like the readme.md... I'll try to get to this soon.

@kwwall
Copy link
Contributor

kwwall commented Jul 27, 2024

@jeremylong - ESAPI faced this simpler problem a while back. (E.g., see ESAPI discussion 768) Assuming that you still wish to continue to support the older Servlet API spec that uses the javax.servlet namespace, but depending on your circumstances, there may be a better way than making all these changes. (This approach if fine if you okay with abandoning your clients that are sill using the older Servlet API or want to maintain multiple forks or branches. We didn't want to do either for ESAPI.)

I played around with the Maven Shade plugin, but ruled that out as it created an uber jar that we didn't feel was acceptable. But then long story short, we ended up using the org.eclipse.transformer:transformer-maven-plugin plugin to just rewrite the byte-code. You can see details here in our pom and here in our README.

Now, given that you have Spring-Core 5.3.19 listed as a dependency in your jsp/pom.xml, this may not work for you, but I think it's certainly worth a shot. The ESAPI team is very happen with it and have heard no complaints yet about it. When we finally start on ESAPI 3, we will abandon support for the older Servlet API and only support the Jarkarta Servlet API 5.0 or later. But for now, we feel that we must support both of them. Of course, YMMV.

@jeremylong
Copy link
Member Author

@kwwall I think you missed part of this PR - the legacy javax.servlet JAR will still be built and published. The only difference is that it will require at least Java 8 now - which shouldn't be a problem. A new jar will be produced that is Java 17 and uses the jakarta namespace for the servlet API.

@jeremylong
Copy link
Member Author

Build passes - but fails on esapi thunk. Will be resolved with #76.

@jeremylong
Copy link
Member Author

@jmanico any issues with these changes?

@jeremylong jeremylong merged commit 9942889 into main Aug 2, 2024
1 check passed
@jeremylong jeremylong deleted the scratch/jakarta branch August 2, 2024 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Any plans for a version using Jakarta Servlet 5.0?
2 participants